<template>
	<view class="container">
		<view class="oneBox" v-for="(item,index) in neirong" :key="index">
			<view class="box">
				<p><span>* </span>{{item.title}}</p>
				<input type="text" value="请输入答案" v-model="item.content">
			</view><!--box-->
		</view><!--oneBox-->
		<button @click="tijiao()">提交</button>
	</view><!--container-->
</template>

<script>
	export default {
		data() {
			return {
				neirong:{},
				routes:""
			}
		},
		onLoad() {
			this.$http(this.$api.datixiangqing, {})
				.then((res) => {
					console.log(res);
					this.neirong=res.data
				})
		},
		
		methods:{
			tijiao:function(){
				console.log(this.routes);
				this.$http(this.$api.tijiao, {
					routes:this.routes
				})
					.then((res) => {
						console.log(res);
					})
			}
		}
	}
</script>

<style>
.oneBox{width: 88%;margin: 0 auto;}
.box{border: 0px solid red;padding: 20px 10px 0 10px;}
.box span{font-weight: bold;color: red;margin-right: 5px;}
.box p{}
.box input{border-bottom: 1px solid #C8C8C8;padding: 15px 0;color: #C8C8C8;}
button{background-color:#FF4040;color:#fff;margin-top:60px;border-radius:50px;height:35px;line-height:35px;width:90%;}
</style>